package com.moyun.finance.controller;

import com.moyun.finance.entity.ReimbursementDetailed;
import com.moyun.finance.entity.Response;
import com.moyun.finance.service.ReimbursementDetailedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/reimbursementDetailed")
public class ReimbursementDetailedController {
    @Autowired
    ReimbursementDetailedService rds;

    //报销单明细删除
    @RequestMapping("/delete")
    public @ResponseBody Response delete(@RequestBody ReimbursementDetailed rd){
        Response res = rds.delete(rd);
        return res;
    }

    //公司下所有明细
    @RequestMapping("/findAll")
    public @ResponseBody Response findAll(String companyId){
        Response res = rds.findAll(companyId);
        return new Response("",res,true);
    }
}
